Imperative programs are formed by a sequence of statements with an explicit order, and their algorithms and programming constructs rely heavily on application state.
命令式编程由一系列带有明确顺序的语句构成,它们的算法和编程构造严重依赖于应用程序的状态。
What's wanted is, in a sense, the exact opposite of a list: a data structure where order is irrelevant, and identity is explicit.
从某种意义上说,您所想要的和列表上给出的是完全相反的:一个顺序不相关,但身份明确的数据结构。
This helps people who work with the code understand it, and it also makes the allowed order of events explicit.
这有助于处理代码的人理解逻辑,也能清楚表明事件允许的出现顺序。
应用推荐